<script setup>
import { ref } from "vue";
import Pagination from "./components/Pagination.vue";

const currentPage = ref(1);
const totalPages = ref(15);

const handlePageChange = (page) => {
  console.log("当前页：", page);
};
</script>

<template>
  <div class="container">
    <h2>分页组件示例</h2>
    <Pagination
      v-model:currentPage="currentPage"
      :total-pages="totalPages"
      @page-change="handlePageChange"
    />
  </div>
</template>

<style scoped>
.container {
  display: flex;
  flex-direction: column;
  align-items: center;
  margin-top: 200px;
}

h2 {
  text-align: center;
  margin-bottom: 20px;
}
</style>
